package com.ruoyi.finance.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 应付核销单对象 pay_reconciliation
 * 
 * @author lmj
 * @date 2024-11-14
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class PayReconciliation extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 单据id */
    private Integer id;

    /** 单据日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "单据日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date documentDate;

    /** 供应商id */
    @Excel(name = "供应商id")
    private Integer supId;

    /** 核销金额 */
    @Excel(name = "核销金额")
    private BigDecimal reconciliationAmount;

    /** 单据阶段 */
    @Excel(name = "单据阶段")
    private Integer documentStage;

    /** 核批结果(1.待审核 1.审核通过 2.驳回) */
    @Excel(name = "核批结果(1.待审核 1.审核通过 2.驳回)")
    private Integer approvalResult;

    /** 已生效 (1: 是, 0: 否) */
    @Excel(name = "已生效 (1: 是, 0: 否)")
    private Integer isEffect;

    /** 已关闭 (1: 是, 0: 否) */
    @Excel(name = "已关闭 (1: 是, 0: 否)")
    private Integer isClose;

    /** 已作废 (1: 是, 0: 否) */
    @Excel(name = "已作废 (1: 是, 0: 否)")
    private Integer isCancel;

    /** 生效时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生效时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date effectiveTime;

    /** 审批人 */
    @Excel(name = "审批人")
    private String approver;

    /** 制单人 */
    @Excel(name = "制单人")
    private String createBy;

    /** 修改人 */
    @Excel(name = "修改人")
    private String modifyBy;

    /** 修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date modifyTime;

    /** 核批意见 */
    @Excel(name = "核批意见")
    private String approvalRemark;

    /** 单据编号 */
    @Excel(name = "单据编号")
    private String documentCode;
    private String supName;
    private List<PayReconciliationDetail> payReconciliationDetailList;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("documentDate", getDocumentDate())
            .append("supId", getSupId())
            .append("reconciliationAmount", getReconciliationAmount())
            .append("documentStage", getDocumentStage())
            .append("approvalResult", getApprovalResult())
            .append("isEffect", getIsEffect())
            .append("isClose", getIsClose())
            .append("isCancel", getIsCancel())
            .append("effectiveTime", getEffectiveTime())
            .append("approver", getApprover())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("modifyBy", getModifyBy())
            .append("modifyTime", getModifyTime())
            .append("remark", getRemark())
            .append("approvalRemark", getApprovalRemark())
            .append("documentCode", getDocumentCode())
            .toString();
    }
}
